public class InsertionSort{
	public static void main(String[] args) {
		int[] sortArray = {2,5,7,3,8,1,4,0,9,6};
		for (int i=1,j,current; i<sortArray.length; i++) {
			current = sortArray[i];
			for(j=i-1;j>=0;j--){
	        	if(sortArray[j]>current){
	        		sortArray[j+1] = sortArray[j];
	        	}else{
	        		break;
	        	}
	        }
			sortArray[j+1] = current;
		}
		for (int k=0; k<sortArray.length; k++) {
			System.out.print(sortArray[k]+"\t");
		}
	}
}